﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MvcEngine.Blog.Models.Entities;
using MvcEngine.Mvc.Models;
using MvcEngine.Core.Pagination;

namespace MvcEngine.Blog.Managers
{
    public interface IBlogPostManager
    {
        void DeletePost(Guid postId);

        void DeletePosts(Guid blogId);
        
        BlogPost GetPost(Guid postId);

        IPagination<BlogPost> GetPosts(Guid blogId, int pageNumber, int postsPerPage);

        IPagination<BlogPost> GetPosts(Guid blogId, int pageNumber, int postsPerPage, bool visibleOnly);

        IPagination<BlogPost> GetPostsByTag(Guid tagId, int pageNumber, int postsPerPage);

        IPagination<BlogPost> GetPostsByCategory(Guid categoryId, int pageNumber, int postsPerPage);

        IList<BlogPost> GetPosts(Guid blogId, int count);

        BlogPost GetPost(string postName, Guid blogId);
        
        void SavePost(BlogPost post, IList<BlogPostCategory> categories, IList<BlogPostTag> tags);

        IList<BlogPostComment> GetComments(Guid postId);

        void DeleteComment(Guid id);

        void SaveComment(BlogPostComment comment);

        BlogPostComment GetComment(Guid id);
    }
}
